package com.bsoft.gol.hcs.specialist.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import javax.persistence.*;
import java.util.Date;
import java.util.Objects;

/**
 * @Author:FangZhiyi
 * @Description
 * @Data Created in 2020/7/21 11:27
 * @Moddified By:
 */
@Entity
@Table(name = "follow_up_route")
public class FollowUpRoute {
    private Long routeId;
    private String routeName;
    private String followType;//随访大类类型 1-专病随访，2-院后随访，3-满意度随访
    private String organizationId;
    private String organizationName;
    private Long parentRouteId;
    private Long diseaseTypeId;
    private String diseaseTypeName;
    private String departmentId;
    private String departmentName;
    //就诊类型 当随访类型为院后或满意度随访时，必输1 门诊 2 住院 3 体检 4 手术 5 检验 6 检查 7 取药 8 治疗
    private Byte visitType;
    private String createDeptId;//创建科室id
    private String createDeptName;//创建科室名称
    private Byte status;
    private String versionNumber;
    private String checkPlan;//复核计划 0否 1是
    private String creatorId;
    private String creatorName;
    private String modifyId;//修改人id
    private String modifyUsername;//修改人名称
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh_CN", timezone = "GMT+8")
    private Date creatorDt;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh_CN", timezone = "GMT+8")
    private Date modifyDt;
    private String tenantId;//租户id

    @Id
    @Column(name = "route_id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public Long getRouteId() {
        return routeId;
    }

    public void setRouteId(Long routeId) {
        this.routeId = routeId;
    }

    @Basic
    @Column(name = "route_name")
    public String getRouteName() {
        return routeName;
    }

    public void setRouteName(String routeName) {
        this.routeName = routeName;
    }

    @Basic
    @Column(name = "follow_type")
    public String getFollowType() {
        return followType;
    }

    public void setFollowType(String followType) {
        this.followType = followType;
    }

    @Basic
    @Column(name = "organization_id")
    public String getOrganizationId() {
        return organizationId;
    }

    public void setOrganizationId(String organizationId) {
        this.organizationId = organizationId;
    }

    @Basic
    @Column(name = "organization_name")
    public String getOrganizationName() {
        return organizationName;
    }

    public void setOrganizationName(String organizationName) {
        this.organizationName = organizationName;
    }

    @Basic
    @Column(name = "parent_route_id")
    public Long getParentRouteId() {
        return parentRouteId;
    }

    public void setParentRouteId(Long parentRouteId) {
        this.parentRouteId = parentRouteId;
    }

    @Basic
    @Column(name = "disease_type_id")
    public Long getDiseaseTypeId() {
        return diseaseTypeId;
    }

    public void setDiseaseTypeId(Long diseaseTypeId) {
        this.diseaseTypeId = diseaseTypeId;
    }

    @Basic
    @Column(name = "disease_type_name")
    public String getDiseaseTypeName() {
        return diseaseTypeName;
    }

    public void setDiseaseTypeName(String diseaseTypeName) {
        this.diseaseTypeName = diseaseTypeName;
    }

    @Basic
    @Column(name = "department_id")
    public String getDepartmentId() {
        return departmentId;
    }

    public void setDepartmentId(String departmentId) {
        this.departmentId = departmentId;
    }

    @Basic
    @Column(name = "department_name")
    public String getDepartmentName() {
        return departmentName;
    }

    public void setDepartmentName(String departmentName) {
        this.departmentName = departmentName;
    }
    @Basic
    @Column(name = "visit_type")
    public Byte getVisitType() {
        return visitType;
    }

    public void setVisitType(Byte visitType) {
        this.visitType = visitType;
    }

    @Basic
    @Column(name = "create_dept_id")
    public String getCreateDeptId() {
        return createDeptId;
    }

    public void setCreateDeptId(String createDeptId) {
        this.createDeptId = createDeptId;
    }

    @Basic
    @Column(name = "create_dept_name")
    public String getCreateDeptName() {
        return createDeptName;
    }

    public void setCreateDeptName(String createDeptName) {
        this.createDeptName = createDeptName;
    }

    @Basic
    @Column(name = "status")
    public Byte getStatus() {
        return status;
    }

    public void setStatus(Byte status) {
        this.status = status;
    }

    @Basic
    @Column(name = "version_number")
    public String getVersionNumber() {
        return versionNumber;
    }

    public void setVersionNumber(String versionNumber) {
        this.versionNumber = versionNumber;
    }

    @Basic
    @Column(name = "check_plan")
    public String getCheckPlan() {
        return checkPlan;
    }

    public void setCheckPlan(String checkPlan) {
        this.checkPlan = checkPlan;
    }

    @Basic
    @Column(name = "creator_id")
    public String getCreatorId() {
        return creatorId;
    }

    public void setCreatorId(String creatorId) {
        this.creatorId = creatorId;
    }

    @Basic
    @Column(name = "creator_name")
    public String getCreatorName() {
        return creatorName;
    }

    public void setCreatorName(String creatorName) {
        this.creatorName = creatorName;
    }

    @Basic
    @Column(name = "creator_dt")
    public Date getCreatorDt() {
        return creatorDt;
    }

    public void setCreatorDt(Date creatorDt) {
        this.creatorDt = creatorDt;
    }

    @Basic
    @Column(name = "modify_dt")
    public Date getModifyDt() {
        return modifyDt;
    }

    public void setModifyDt(Date modifyDt) {
        this.modifyDt = modifyDt;
    }

    @Basic
    @Column(name = "modify_id")
    public String getModifyId() {
        return modifyId;
    }

    public void setModifyId(String modifyId) {
        this.modifyId = modifyId;
    }

    @Basic
    @Column(name = "modify_username")
    public String getModifyUsername() {
        return modifyUsername;
    }

    public void setModifyUsername(String modifyUsername) {
        this.modifyUsername = modifyUsername;
    }
    @Basic
    @Column(name = "tenant_id")
    public String getTenantId() {
        return tenantId;
    }

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        FollowUpRoute that = (FollowUpRoute) o;
        return routeId.equals(that.routeId) &&
                Objects.equals(routeName, that.routeName) &&
                Objects.equals(organizationId, that.organizationId) &&
                Objects.equals(organizationName, that.organizationName) &&
                Objects.equals(parentRouteId, that.parentRouteId) &&
                Objects.equals(diseaseTypeId, that.diseaseTypeId) &&
                Objects.equals(diseaseTypeName, that.diseaseTypeName) &&
                Objects.equals(departmentId, that.departmentId) &&
                Objects.equals(departmentName, that.departmentName) &&
                Objects.equals(status, that.status) &&
                Objects.equals(versionNumber, that.versionNumber) &&
                Objects.equals(creatorId, that.creatorId) &&
                Objects.equals(creatorName, that.creatorName) &&
                Objects.equals(creatorDt, that.creatorDt) &&
                Objects.equals(followType, that.followType) &&
                Objects.equals(createDeptId, that.createDeptId) &&
                Objects.equals(createDeptName, that.createDeptName) &&
                Objects.equals(checkPlan, that.checkPlan) &&
                Objects.equals(modifyId, that.modifyId) &&
                Objects.equals(modifyUsername, that.modifyUsername) &&
                Objects.equals(modifyDt, that.modifyDt);
    }

    @Override
    public int hashCode() {
        return Objects.hash(routeId, routeName, followType, organizationId, organizationName, parentRouteId, diseaseTypeId,
                diseaseTypeName, departmentId, departmentName, createDeptId, createDeptName, status, versionNumber, checkPlan, creatorId, creatorName,
                creatorDt, modifyId, modifyUsername, modifyDt);
    }
}
